# Maintainer: David Macek <david.macek.0@gmail.com>

_realname="msys2-launcher"
pkgname=("${_realname}")
pkgver=1.3
pkgrel=1
pkgdesc="Helper for launching MSYS2 shells"
arch=('x86_64' 'i686')
license=('MIT')
backup=({mingw32,mingw64,msys2}.ini)
conflicts=("${_realname}-git")
replaces=("${_realname}-git")
depends=("mintty>=1~2.2.1")
makedepends=('mingw-w64-cross-gcc')
source=("https://github.com/msys2/msys2-launcher/archive/v${pkgver}.tar.gz")
sha256sums=('aa9bee142a6ec2ceabfc40d260412c32ffaf914aac15573cc813b6cd48074457')

build() {
  cd "msys2-launcher-${pkgver}"
  make PREFIX=/opt/bin/${CARCH}-w64-mingw32-
}

package() {
  cd "msys2-launcher-${pkgver}"
  cp {mingw32,mingw64,msys2,ucrt64,clang64}.{exe,ini} "${pkgdir}"
}
